package com.tiancheng.onecode.model.request;

import lombok.Data;

/**
 * @Author: kellen
 * @Description: 基础分页查询
 * @Date: create in 2024/12/9 21:32
 */
@Data
public class BasePageReq {
    /**
     * 当前页
     */
    private Integer currentPage;

    /**
     * 页大小
     */
    private Integer pageSize;

    public Integer getCurrentPage() {
        if (null == currentPage || currentPage < 0) {
            currentPage = 1;
        }
        return currentPage;
    }

    public Integer getPageSize() {
        if (null == pageSize || pageSize <= 0) {
            pageSize = 10;
        }
        return pageSize;
    }
}
